<template>
    <div class='select-index'>
        <el-select v-model="value" ref="selectRef" placeholder="请选择" @focus="$emit('onfocus',value,$refs.selectRef)" @change="$emit('onchange',value)">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
        </el-select>
    </div>
</template>

<script>
import list from '@/api/hmmm/questions'
export default {
    name: 'SelectIndex',
    //导入组件
    components: {},
    //传递数据
    props: {
        options: {
            type: [Object, Array, String],
            default: () => [] || {} || '',
        },
    },
    //数据存储
    data() {
        return {
            value: '',
            label: '',
        }
    },
    //事件处理函数
    methods: {
        onclick() {
            this.value = ''
        },
    },
    //事件监听函数
    watch: {},
    //计算属性
    computed: {},
    //生命周期函数
    created() {},
}
</script>

<style lang='less' scoped>
</style>